<%@ Page Theme="BlueSkin" Title="LMS : Catalog manager --> Questions" Language="C#" MasterPageFile="~/LmsWebSite/MasterEN.master" AutoEventWireup="true" CodeFile="QuestionsViewEN.aspx.cs" Inherits="QuestionsViewEN" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="up1" runat="server" >
    <ContentTemplate>
        <asp:UpdateProgress ID="uprogress1" runat="server">
            <ProgressTemplate>
            
                <div style="position:fixed;width:30px;height:30px;top:0px;right:0px;border:1px solid orange;">
                    <img src="images/loading.gif" style="width:30px;height:30px;"  alt='Loading' title='Loading'/>
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
    
        
<table cellspacing="5" cellpadding="5" width="100%">
        <tr>
            <td align="left" class="heading">
               <a href="QuestionsCourseEN.aspx">Catalog manager</a> --> Questions
            </td>
        </tr>
    </table>
    <br />
    
    <div class="aligning allWidth floating direction" style="margin-bottom:10px;">
        <div class="floating" style="font-size:1px;width:30px;height:1px;"></div>
        <div class="floating direction aligning" style="width:300px;">
            <asp:TextBox ID="txtSearch" runat="server" Width="300px" Visible="false"></asp:TextBox>
           
        </div>
        <div class="floating" style="font-size:1px;width:11px;height:1px;"></div>
        <div class="floating direction aligning" style="width:100px;">
            <asp:Button ID="btnSearch" runat="server" Text="Search" 
                onclick="btnSearch_Click" CausesValidation="false" Visible="false"/>
        
        </div>
            
        
        
        <div class="clearing"></div>
        <div class="aligning allWidth floating direction">
            <asp:GridView DataKeyNames="ID" ID="grdUsers" runat="server" style="margin:30px;" 
                AutoGenerateColumns="False" AllowPaging="True" 
                 onrowdeleting="grdUsers_RowDeleting" Font-Size="12px" 
                onpageindexchanging="grdUsers_PageIndexChanging" 
                onrowediting="grdUsers_RowEditing" EnableModelValidation="True">
                <HeaderStyle HorizontalAlign="Center" />

                <RowStyle HorizontalAlign="Center" />

                <EmptyDataTemplate>
                <div class="aligning floating direction" style="width:300px;">
                    <asp:Label ID="Label2" runat="server" Text="Label" >No Questions found</asp:Label> 
                    <br />
                    <br />
                    
                </div>
                    
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblQuestionARHead" runat="server" Text="Question in Arabic" Width="210px" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            
                           <asp:Label ID="lblQuestionARItem" runat="server" Text='<%#  Eval ("QuestionAR") %>' Width="210px" style="margin-top:10px;margin-bottom:10px;"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblQuestionENHead" runat="server" Text="Question in english" Width="210px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           <asp:Label ID="lblQuestionENItem" runat="server" Text='<%#  Eval ("QuestionEN") %>' Width="210px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblQuestionTypeHead" runat="server" Text="Type" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                        
                           <asp:Label ID="lblQuestionTypeItem" runat="server" Text='<%#  ((DatabaseComponent.Questions)Container.DataItem).objQuestionTypes.QuestionTypeEN %>' Width="120px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                   
                   
                   <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblDegreeHead" runat="server" Text="Question Degree" Width="60px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           <asp:Label ID="lblDegreeItem" runat="server" Text='<%#  Eval ("QuestionDegree") %>' Width="60px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                   
                   
                    <asp:TemplateField>
                        <HeaderTemplate>
                        
                        
                        
                            <asp:Label ID="lblCourseHead" runat="server" Text="Course" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           <asp:Label ID="lblCourseItem" runat="server" Text='<%#  ((DatabaseComponent.Questions)Container.DataItem).objCourses.CourseNameEN %>' Width="120px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                   
                   
                    
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                                <asp:Label ID="lblActionsHead" runat="server" Text="Action" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           
                                <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="false" CommandName="Edit" CommandArgument='<%# Container.DataItemIndex %>'   Text="Edit"></asp:LinkButton>
                          
                                &nbsp;&nbsp;
                                
                                 <asp:LinkButton ID="lnkDelete" runat="server"  CommandName="Delete" CommandArgument='<%# Container.DataItemIndex %>' OnClientClick="javascript:return confirm ('Do you really want to delete this Question ?');"   Text="Delete" CausesValidation="false"></asp:LinkButton>
                                  
                                                 
                        </ItemTemplate>
                        
                        
                    </asp:TemplateField>
                    
                    
                    
                    
                    
                        
                           
                        
               
                
                
                
                </Columns>
                
                
            </asp:GridView>
        </div>
        
        
        
        
        <div class="clearing" style="width:1px;height:20px;"></div>
        
        
        <div class="allWidthWithMargins " style="margin:30px;">
        
         <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblQuestionAR" runat="server" Text="Question in Arabic *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           <asp:TextBox ID="txtQuestionAR" runat="server" Text="" style="width:250px;height:100px; " TextMode="MultiLine"></asp:TextBox>
        </div>  
       <div class="floating aligning direction" >
           <asp:RequiredFieldValidator ID="rfvQuestionAR" runat="server" ErrorMessage="You must enter the question in arabic" ControlToValidate="txtQuestionAR">*</asp:RequiredFieldValidator>
        </div>
        
        <div class="clearing" style="height:10px;width:1px;"></div>
        
        
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblQuestionEN" runat="server" Text="Question in English *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           <asp:TextBox ID="txtQuestionEN" runat="server" Text="" style="width:250px;height:100px;" TextMode="MultiLine"></asp:TextBox>
        </div>  
       <div class="floating aligning direction" >
           <asp:RequiredFieldValidator ID="rfvQuestionEN" runat="server" ErrorMessage="You must enter the question in english" ControlToValidate="txtQuestionEN">*</asp:RequiredFieldValidator>
        </div>
        
        
        
        <div class="clearing" style="height:10px;width:1px;"></div>
        
        
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblQuestionDegree" runat="server" Text="Degree *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           <asp:TextBox ID="txtQuestionDegree" runat="server" Text="5" style="width:50px;"></asp:TextBox>
        </div>  
       <div class="floating aligning direction" >
           <asp:RequiredFieldValidator ID="rfvQuestionDegree" runat="server" ErrorMessage="You must enter a question degree" ControlToValidate="txtQuestionDegree">*</asp:RequiredFieldValidator>
           <asp:RegularExpressionValidator ID="revQuestionDegree" runat="server" ErrorMessage="Question degree must be a number or a floating point number" ControlToValidate="txtQuestionDegree" ValidationExpression="[0-9]+([.][0-9]+)?">*</asp:RegularExpressionValidator>
        
        </div>
        
        
        
        <div class="clearing" style="height:10px;width:1px;"></div>
        
        
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblQuestionTypesID" runat="server" Text="Question type *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           <asp:DropDownList ID="ddlQuestionTypesID" runat="server" AutoPostBack="true" 
               Width="250px" onselectedindexchanged="ddlQuestionTypesID_SelectedIndexChanged">
           </asp:DropDownList>
        </div>  
       <div class="floating aligning direction" >
           
        </div>
        
        
        <div class="clearing" style="height:10px;width:1px;"></div>
        
            <asp:Panel ID="pnlChoose" runat="server" width="700px" >
                    <div class="clearing" style="width:1px;height:20px;"></div>
        
        
                    
                    
                     <div class="floating aligning direction" style="width:200px;">
                        <asp:Label ID="lblAnswera" runat="server" Text="Answer a arabic"></asp:Label>
                    </div>        
                    
                   <div class="floating aligning direction" style="width:250px;">
                       <asp:TextBox ID="txtAnswera" runat="server" Text="" style="width:250px;height:50px; " TextMode="MultiLine"></asp:TextBox>
                    </div>  
                   <div class="floating aligning direction" style="margin-left:10px;width:120px;">
                       <asp:CheckBox ID="chkAnswera" runat="server" Checked="false" Text="Is answer" />
                    </div>
                    
                    <div class="clearing"></div>
                    <div class="floating aligning direction" style="width:200px;">
                        <asp:Label ID="lblAnsweraEN" runat="server" Text="Answer a english"></asp:Label>
                    </div>        
                    
                   <div class="floating aligning direction" style="width:250px;">
                       <asp:TextBox ID="txtAnsweraEN" runat="server" Text="" style="width:250px;height:50px; " TextMode="MultiLine"></asp:TextBox>
                    </div>  
                    
                    <div class="clearing" style="width:1px;height:20px;"></div>
        
        
                    
                    
                     <div class="floating aligning direction" style="width:200px;">
                        <asp:Label ID="lblAnswerb" runat="server" Text="Answer b arabic"></asp:Label>
                    </div>        
                    
                   <div class="floating aligning direction" style="width:250px;">
                       <asp:TextBox ID="txtAnswerb" runat="server" Text="" style="width:250px;height:50px; " TextMode="MultiLine"></asp:TextBox>
                    </div>  
                   <div class="floating aligning direction" style="margin-left:10px;width:120px;">
                       <asp:CheckBox ID="chkAnswerb" runat="server" Checked="false" Text="Is answer" />
                    </div>
                    
                    <div class="clearing"></div>
                    <div class="floating aligning direction" style="width:200px;">
                        <asp:Label ID="lblAnswerbEN" runat="server" Text="Answer b english"></asp:Label>
                    </div>        
                    
                   <div class="floating aligning direction" style="width:250px;">
                       <asp:TextBox ID="txtAnswerbEN" runat="server" Text="" style="width:250px;height:50px; " TextMode="MultiLine"></asp:TextBox>
                    </div>  
                    
                    
                    <div class="clearing" style="width:1px;height:20px;"></div>
        
        
                    
                    
                     <div class="floating aligning direction" style="width:200px;">
                        <asp:Label ID="lblAnswerc" runat="server" Text="Answer c arabic"></asp:Label>
                    </div>        
                    
                   <div class="floating aligning direction" style="width:250px;">
                       <asp:TextBox ID="txtAnswerc" runat="server" Text="" style="width:250px;height:50px; " TextMode="MultiLine"></asp:TextBox>
                    </div>  
                   <div class="floating aligning direction" style="margin-left:10px;width:120px;">
                       <asp:CheckBox ID="chkAnswerc" runat="server" Checked="false" Text="Is answer" />
                    </div>
                    
                    <div class="clearing"></div>
                    <div class="floating aligning direction" style="width:200px;">
                        <asp:Label ID="lblAnswercEN" runat="server" Text="Answer c english"></asp:Label>
                    </div>        
                    
                   <div class="floating aligning direction" style="width:250px;">
                       <asp:TextBox ID="txtAnswercEN" runat="server" Text="" style="width:250px;height:50px; " TextMode="MultiLine"></asp:TextBox>
                    </div>  
                    
                    
                     <div class="clearing" style="width:1px;height:20px;"></div>
        
        
                    
                    
                     <div class="floating aligning direction" style="width:200px;">
                        <asp:Label ID="lblAnswerd" runat="server" Text="Answer d arabic"></asp:Label>
                    </div>        
                    
                   <div class="floating aligning direction" style="width:250px;">
                       <asp:TextBox ID="txtAnswerd" runat="server" Text="" style="width:250px;height:50px; " TextMode="MultiLine"></asp:TextBox>
                    </div>  
                   <div class="floating aligning direction" style="margin-left:10px;width:120px;">
                       <asp:CheckBox ID="chkAnswerd" runat="server" Checked="false" Text="Is answer" />
                    </div>
                    
                    <div class="clearing"></div>
                    <div class="floating aligning direction" style="width:200px;">
                        <asp:Label ID="lblAnswerdEN" runat="server" Text="Answer d english"></asp:Label>
                    </div>        
                    
                   <div class="floating aligning direction" style="width:250px;">
                       <asp:TextBox ID="txtAnswerdEN" runat="server" Text="" style="width:250px;height:50px;" TextMode="MultiLine"></asp:TextBox>
                    </div>  
                    
                    <div class="clearing"></div>
            </asp:Panel>
            
            
       <div class="clearing" style="height:10px;width:1px;"></div>     
        
        
        <asp:Panel ID="pnlRightWrong" runat="server" width="600px">
        
            <div class="clearing" style="width:1px;height:20px;"></div>
        
        
                    
                    
                     <div class="floating aligning direction" style="width:200px;">
                        <asp:Label ID="lblChooseAnswer" runat="server" Text="Choose the answer"></asp:Label>
                    </div>        
                    
                   <div class="floating aligning direction" style="width:250px;">
                       <asp:RadioButtonList ID="rblChooseAnswer" runat="server">
                        <asp:ListItem Text="True" Value="1" Selected="True"></asp:ListItem>
                        <asp:ListItem Text="False" Value="0"></asp:ListItem>
                       </asp:RadioButtonList>
                    </div>  
                   <div class="floating aligning direction" >
                       
                    </div>
                    
                    <div class="clearing"></div>
        
        
        </asp:Panel>
        
        <div class="clearing" style="width:1px;height:30px;"></div>
        
        <div class="floating direction" style="width:500px;text-align:right">
            
            <div style="float:right;"><asp:Button ID="btnSave" runat="server" Text="Save" onclick="btnSave_Click" BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" ForeColor="White"/></div>
            
            <div style="float:right;font-size:1px;height:1px;width:5px;"></div>

            <div style="float:right;">
                <asp:Button ID="btnDelete" runat="server" Text="Delete" 
                OnClientClick="javascript:return confirm('Are you sure , you want to delete question and its answers ?');" 
                onclick="btnDelete_Click" style="height: 26px" CausesValidation="false" BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" ForeColor="White"/></div>
            
            <div style="float:right;font-size:1px;height:1px;width:5px;"></div>

            
            <div style="float:right;">
                <asp:Button ID="btnNew" runat="server" Text="New" 
                 onclick="btnNew_Click" CausesValidation="false" BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" ForeColor="White"/>
            </div>
           

           <div style="float:right;font-size:1px;height:1px;width:5px;"></div>

           <div class="aligning direction" style="float:right">
                <asp:Button ID="btnBack" runat="server" Text="Back" CausesValidation="false" OnClientClick="history.go(-1);return false;" BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" ForeColor="White"/>
            </div>

            
            <div class="clearing"></div>
            
        
        </div>
        
        <div class="clearing" style="width:1px;height:20px;"></div>
        
        <div class="allWidth floating direction" style="text-align:right;">
            
        </div>
        
        
        <div class="clearing"></div>
        
        <div class="aligning allWidth floating direction">
            <asp:Label ID="lblError" runat="server" Text="" ForeColor="Red" style="margin-left:30px;" EnableViewState ="false"></asp:Label>
            <div class="clearing"></div>
            <asp:Label ID="lblResult" runat="server" Text="" ForeColor="Green" style="margin-left:30px;" EnableViewState="false"></asp:Label>
            
            <div class="clearing"></div>
        </div>
        
        <div class="clearing"></div>
        <div class="aligning allWidth floating direction">
            <asp:ValidationSummary ID="vsError" runat="server" />
            
            <div class="clearing"></div>
        </div>
        
        <div class="clearing"></div>
      </div>  
      
      <div class="clearing"></div>
    </div>
    
    
    
    <div class="clearing"></div>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

